From ab859852c31d8163496eb93fc5366930f076cf92 Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Thu, 8 Feb 2007 06:46:13 -0500 Subject: [PATCH] [LIBXC][POWERPC] use O_CREAT on open call for DTB_FILE This fixes a bug in the creating of the flat dev tree. If open is used and O_CREAT not is specified, it will fail if the file has not already been created. This patch will create the file if it does not exist already. Which will allow for DomU creation. Signed-off-by: Jerone Young Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --HG-- extra : transplant_source : Q%CA%40%88N%D8%25%B0%D7%FD%F8%1A%1E%07%8E2E%1BM%22 --- tools/libxc/powerpc64/mk_flatdevtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/powerpc64/mk_flatdevtree.c b/tools/libxc/powerpc64/mk_flatdevtree.c index 17085aeca1..14af93336a 100644 --- a/tools/libxc/powerpc64/mk_flatdevtree.c +++ b/tools/libxc/powerpc64/mk_flatdevtree.c @@ -618,7 +618,7 @@ int make_devtree(struct ft_cxt *root, } /* write a copy of the tree to a file */ - if ((dtb_fd = open(DTB_FILE , O_RDWR)) == -1) { + if ((dtb_fd = open(DTB_FILE , O_CREAT|O_RDWR)) == -1) { PERROR("%s: failed to open file %s", __func__, DTB_FILE); goto error; } -- 2.30.2